﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SumOfSequenceOfFibonacci
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());

            if (N == 1)
            {
                Console.WriteLine(0);
            }
            else if (N == 2)
            {
                Console.WriteLine(1);
            }
            else
            {
                int firstValue = 0;
                int secondValue = 1;
                int sum = 1;
                for (int index = 2; index < N; index++)
                {
                    int swapValue = firstValue;
                    firstValue = secondValue;
                    secondValue = secondValue + swapValue;
                    sum += secondValue;
                }
                Console.WriteLine(sum);
            }

        }
    }
}
